<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"><title>Linux环境搭建、配置记录(不定时更新) | Forgo7ten'blog</title><meta name="keywords" content="工具&amp;环境调教"><meta name="author" content="Forgo7ten"><meta name="copyright" content="Forgo7ten"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="ubuntu虚拟机安装 ¶  Init ¶  安装Ubuntu时候语言选择默认英文 ¶  0. 设置root密码 ¶  12sudo passwd  # 修改root密码sudo passwd [username]  # 修改某用户密码 1. 先更新源 ¶  1sudo apt update 2. 安装VMwareTools ¶  1sudo apt install open-vm-tools-d">
<meta property="og:type" content="article">
<meta property="og:title" content="Linux环境搭建、配置记录(不定时更新)">
<meta property="og:url" content="https://forgo7ten.github.io/Env/Linux_environment_configuration_record/index.html">
<meta property="og:site_name" content="Forgo7ten&#39;blog">
<meta property="og:description" content="ubuntu虚拟机安装 ¶  Init ¶  安装Ubuntu时候语言选择默认英文 ¶  0. 设置root密码 ¶  12sudo passwd  # 修改root密码sudo passwd [username]  # 修改某用户密码 1. 先更新源 ¶  1sudo apt update 2. 安装VMwareTools ¶  1sudo apt install open-vm-tools-d">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="http://forgo7ten.gitee.io/store/imgs/12.jpg">
<meta property="article:published_time" content="2020-12-31T16:00:00.000Z">
<meta property="article:modified_time" content="2022-01-08T16:00:00.000Z">
<meta property="article:author" content="Forgo7ten">
<meta property="article:tag" content="工具&amp;环境调教">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://forgo7ten.gitee.io/store/imgs/12.jpg"><link rel="shortcut icon" href="/images/favicon.jpg"><link rel="canonical" href="https://forgo7ten.github.io/Env/Linux_environment_configuration_record/"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//hm.baidu.com"/><link rel="preconnect" href="//www.clarity.ms"/><link rel="preconnect" href="//fonts.googleapis.com" crossorigin=""/><link rel="preconnect" href="//busuanzi.ibruce.info"/><meta name="google-site-verification" content="8L0ZjthONyq6-m7FniRTH8A7Bh0x-KOPZbKOcNimnYA"/><meta name="baidu-site-verification" content="code-gjVsyPt7yr"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.css" media="print" onload="this.media='all'"><script>var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?b076845d73a4f28b3c7401b2a0a8a9db";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script><script>(function(c,l,a,r,i,t,y){
    c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
    t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
    y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
})(window, document, "clarity", "script", "9zbibmmffi");</script><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Titillium+Web&amp;display=swap" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: {"path":"search.xml","languages":{"hits_empty":"找不到您查询的内容：${query}"}},
  translate: {"defaultEncoding":2,"translateDelay":0,"msgToTraditionalChinese":"繁","msgToSimplifiedChinese":"簡"},
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":300},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: true,
    post: false
  },
  runtime: '天',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: {"chs_to_cht":"你已切换为繁体","cht_to_chs":"你已切换为简体","day_to_night":"你已切换为深色模式","night_to_day":"你已切换为浅色模式","bgLight":"#49b1f5","bgDark":"#121212","position":"bottom-left"},
  source: {
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery@2/dist/fjGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery@2/dist/fjGallery.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: true,
  isAnchor: true
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: 'Linux环境搭建、配置记录(不定时更新)',
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2022-01-09 00:00:00'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><meta name="generator" content="Hexo 5.4.0"><link rel="alternate" href="/atom.xml" title="Forgo7ten'blog" type="application/atom+xml">
</head><body><div id="loading-box"><div class="loading-left-bg"></div><div class="loading-right-bg"></div><div class="spinner-box"><div class="configure-border-1"><div class="configure-core"></div></div><div class="configure-border-2"><div class="configure-core"></div></div><div class="loading-word">加载中...</div></div></div><div id="web_bg"></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="/images/avatar.jpg" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="site-data is-center"><div class="data-item"><a href="/archives/"><div class="headline">文章</div><div class="length-num">20</div></a></div><div class="data-item"><a href="/tags/"><div class="headline">标签</div><div class="length-num">8</div></a></div><div class="data-item"><a href="/categories/"><div class="headline">分类</div><div class="length-num">6</div></a></div></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-compass"></i><span> 目录</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></li><li><a class="site-page child" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></li><li><a class="site-page child" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/atom.xml"><i class="fa-fw fa fa-rss"></i><span> RSS订阅</span></a></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div><div class="menus_item"><a class="site-page" href="/messageboard/"><i class="fa-fw fas fa-comment-dots"></i><span> 留言板</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url('http://forgo7ten.gitee.io/store/imgs/12.jpg')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">Forgo7ten'blog</a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-compass"></i><span> 目录</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></li><li><a class="site-page child" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></li><li><a class="site-page child" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/atom.xml"><i class="fa-fw fa fa-rss"></i><span> RSS订阅</span></a></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div><div class="menus_item"><a class="site-page" href="/messageboard/"><i class="fa-fw fas fa-comment-dots"></i><span> 留言板</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">Linux环境搭建、配置记录(不定时更新)</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2020-12-31T16:00:00.000Z" title="发表于 2021-01-01 00:00:00">2021-01-01</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2022-01-08T16:00:00.000Z" title="更新于 2022-01-09 00:00:00">2022-01-09</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/%E5%B7%A5%E5%85%B7-%E7%8E%AF%E5%A2%83%E8%B0%83%E6%95%99/">工具&amp;环境调教</a></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-wordcount"><i class="far fa-file-word fa-fw post-meta-icon"></i><span class="post-meta-label">字数总计:</span><span class="word-count">4.1k</span><span class="post-meta-separator">|</span><i class="far fa-clock fa-fw post-meta-icon"></i><span class="post-meta-label">阅读时长:</span><span>18分钟</span></span><span class="post-meta-separator">|</span><span class="post-meta-pv-cv" id="" data-flag-title="Linux环境搭建、配置记录(不定时更新)"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">阅读量:</span><span id="busuanzi_value_page_pv"></span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><h1 id="ubuntu虚拟机安装">ubuntu虚拟机安装<a class="header-anchor" href="#ubuntu虚拟机安装"> ¶ </a></h1>
<h1 id="Init">Init<a class="header-anchor" href="#Init"> ¶ </a></h1>
<h2 id="安装Ubuntu时候语言选择默认英文">安装Ubuntu时候语言选择默认英文<a class="header-anchor" href="#安装Ubuntu时候语言选择默认英文"> ¶ </a></h2>
<h2 id="0-设置root密码">0. 设置root密码<a class="header-anchor" href="#0-设置root密码"> ¶ </a></h2>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">sudo passwd  <span class="comment"># 修改root密码</span></span><br><span class="line">sudo passwd [username]  <span class="comment"># 修改某用户密码</span></span><br></pre></td></tr></table></figure>
<h2 id="1-先更新源">1. 先更新源<a class="header-anchor" href="#1-先更新源"> ¶ </a></h2>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo apt update</span><br></pre></td></tr></table></figure>
<h2 id="2-安装VMwareTools">2. 安装VMwareTools<a class="header-anchor" href="#2-安装VMwareTools"> ¶ </a></h2>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo apt install open-vm-tools-desktop -y</span><br></pre></td></tr></table></figure>
<h2 id="3-Ubuntu换源">3. Ubuntu换源<a class="header-anchor" href="#3-Ubuntu换源"> ¶ </a></h2>
<p><strong>ubuntu22.04可以直接在设置-&gt;关于-&gt;软件更新中，选择合适的源，无需修改文件</strong></p>
<hr>
<p><a target="_blank" rel="noopener" href="https://developer.aliyun.com/mirror/ubuntu">ubuntu镜像_ubuntu下载地址_ubuntu安装教程-阿里巴巴开源镜像站 (aliyun.com)</a></p>
<p>Ubuntu系统中，软件源文件地址为：<code>/etc/apt/sources.list</code></p>
<p>1.备份原来的源，将以前的源备份一下，以防以后可以用的。</p>
<p><code>sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak</code></p>
<p>2.打开<code>/etc/apt/sources.list</code>文件，在前面添加如下条目，并保存。</p>
<p><code>sudo vim /etc/apt/sources.list</code>（可将vim更换为自己熟悉的编辑器）</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line">deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse</span><br><span class="line">deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse</span><br><span class="line"></span><br><span class="line">deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse</span><br><span class="line">deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse</span><br><span class="line"></span><br><span class="line">deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse</span><br><span class="line">deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse</span><br><span class="line"></span><br><span class="line">deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse</span><br><span class="line">deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse</span><br><span class="line"></span><br><span class="line">deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse</span><br><span class="line">deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse</span><br></pre></td></tr></table></figure>
<h2 id="4-更新系统软件">4. 更新系统软件<a class="header-anchor" href="#4-更新系统软件"> ¶ </a></h2>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo apt-get upgrade -y</span><br></pre></td></tr></table></figure>
<h2 id="5-更换终端">5. 更换终端<a class="header-anchor" href="#5-更换终端"> ¶ </a></h2>
<h3 id="安装Terminator">安装Terminator<a class="header-anchor" href="#安装Terminator"> ¶ </a></h3>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo apt-get install terminator -y</span><br></pre></td></tr></table></figure>
<p>从Ubuntu的全部软件中找到Terminator软件图标，右键添加到收藏夹。</p>
<h3 id="安装zsh">安装zsh<a class="header-anchor" href="#安装zsh"> ¶ </a></h3>
<ol>
<li>
<p>安装zsh</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo apt-get install zsh -y</span><br></pre></td></tr></table></figure>
</li>
<li>
<p>配置zsh为默认终端（直接安装oh-my-zsh可以设置）</p>
</li>
</ol>
<pre><code><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># which zsh | sudo tee -a /etc/shells #(好像不用)</span></span><br><span class="line">sudo chsh -s /bin/zsh</span><br><span class="line"><span class="comment"># 或者 chsh -s $(which zsh)</span></span><br><span class="line">reboot</span><br></pre></td></tr></table></figure>
</code></pre>
<ol start="3">
<li>
<p>配置<a target="_blank" rel="noopener" href="https://github.com/ohmyzsh/ohmyzsh">oh-my-zsh</a></p>
<ol>
<li>
<p>安装</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sh -c <span class="string">&quot;<span class="subst">$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)</span>&quot;</span></span><br></pre></td></tr></table></figure>
</li>
<li>
<p>配置主题</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">vim ~/.zshrc</span><br><span class="line"></span><br><span class="line"><span class="comment"># SH_THEME=&quot;robbyrussell&quot;</span></span><br><span class="line"><span class="comment"># SH_THEME=&quot;ys&quot;</span></span><br><span class="line">ZSH_THEME=<span class="string">&quot;agnoster&quot;</span>  <span class="comment"># 特殊字符无法显示？</span></span><br></pre></td></tr></table></figure>
</li>
</ol>
</li>
<li>
<p>oh-my-zsh插件配置<br>
1.   zsh-autosuggestions<br>
安装<br>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line">git <span class="built_in">clone</span> https://github.com/zsh-users/zsh-autosuggestions <span class="variable">$&#123;ZSH_CUSTOM:-~/.oh-my-zsh/custom&#125;</span>/plugins/zsh-autosuggestions</span><br><span class="line"></span><br><span class="line"><span class="comment"># 修改zshrc使配置生效</span></span><br><span class="line">vim ~/.zshrc</span><br><span class="line"></span><br><span class="line">plugins=( </span><br><span class="line">    <span class="comment"># other plugins...</span></span><br><span class="line">    zsh-autosuggestions</span><br><span class="line">)</span><br><span class="line"></span><br><span class="line"><span class="comment"># 使提示文本为灰色(可改可不改)</span></span><br><span class="line"><span class="comment"># export TERM=xterm-256color</span></span><br></pre></td></tr></table></figure></p>
</li>
</ol>
<pre><code>2.   zsh-syntax-highlighting
     <figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">git <span class="built_in">clone</span> https://github.com/zsh-users/zsh-syntax-highlighting.git <span class="variable">$&#123;ZSH_CUSTOM:-~/.oh-my-zsh/custom&#125;</span>/plugins/zsh-syntax-highlighting</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment"># 修改zshrc使配置生效</span></span><br><span class="line">vim ~/.zshrc</span><br><span class="line">plugins=( [plugins...] zsh-syntax-highlighting)</span><br></pre></td></tr></table></figure>

3.   autojump
     <figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">git <span class="built_in">clone</span> https://github.com/wting/autojump.git</span><br><span class="line"><span class="built_in">cd</span> autojump &amp;&amp; ./install.py</span><br><span class="line"></span><br><span class="line"><span class="comment"># 根据提示 修改zshrc使配置生效</span></span><br><span class="line">vim ~/.zshrc</span><br><span class="line">plugins=( [plugins...] autojump)</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">	[[ -s /home/yhnkkio/.autojump/etc/profile.d/autojump.sh ]] &amp;&amp; <span class="built_in">source</span> /home/yhnkkio/.autojump/etc/profile.d/autojump.sh</span><br><span class="line"></span><br><span class="line">	<span class="built_in">autoload</span> -U compinit &amp;&amp; compinit -u</span><br></pre></td></tr></table></figure>
</code></pre>
<ol start="5">
<li>其他zsh配置 <figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line">plugins=(git</span><br><span class="line">        zsh-autosuggestions</span><br><span class="line">        zsh-syntax-highlighting</span><br><span class="line">        autojump</span><br><span class="line">)</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment"># history 命令查看历史输入命令的时间展示格式</span></span><br><span class="line">HIST_STAMPS=<span class="string">&quot;yyyy-mm-dd&quot;</span></span><br><span class="line"><span class="comment"># 配置个人环境变量</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">if</span> [ -f ~/.bash_profile ]; <span class="keyword">then</span></span><br><span class="line">    . ~/.bash_profile</span><br><span class="line"><span class="keyword">fi</span></span><br></pre></td></tr></table></figure>
</li>
</ol>
<h2 id="5-optional-将Ubuntu系统语言更换为简体中文">5(optional). 将Ubuntu系统语言更换为简体中文<a class="header-anchor" href="#5-optional-将Ubuntu系统语言更换为简体中文"> ¶ </a></h2>
<p><a target="_blank" rel="noopener" href="https://blog.csdn.net/qq_19339041/article/details/80058575">ubuntu 16.04 更改系统语言为简体中文</a><br>
System Settings→Language Support<br>
<img src= "" data-lazy-src="/Env/Linux_environment_configuration_record/20200204181353420.png" alt="在这里插入图片描述"><br>
<img src= "" data-lazy-src="/Env/Linux_environment_configuration_record/2020020418140546.png" alt="在这里插入图片描述"><br>
<img src= "" data-lazy-src="/Env/Linux_environment_configuration_record/20200204181422742.png" alt="在这里插入图片描述"><br>
重启后会改变<br>
<strong>标准文件夹不要更新名称！！！</strong><br>
<img src= "" data-lazy-src="/Env/Linux_environment_configuration_record/20200204181627107.png" alt="在这里插入图片描述"></p>
<h2 id="6-安装输入法">6. 安装输入法<a class="header-anchor" href="#6-安装输入法"> ¶ </a></h2>
<h3 id="安装Fcitx5">安装Fcitx5<a class="header-anchor" href="#安装Fcitx5"> ¶ </a></h3>
<p>Ubuntu22.04</p>
<ol>
<li>
<p>安装软件及依赖</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo apt install fcitx5 fcitx5-chinese-addons fcitx5-frontend-gtk4 fcitx5-frontend-gtk3 fcitx5-frontend-gtk2 fcitx5-frontend-qt5 gnome-tweaks</span><br></pre></td></tr></table></figure>
</li>
<li>
<p>设置为默认输入法</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">im-config</span><br></pre></td></tr></table></figure>
<p>根据弹出窗口的提示，将首选输入法设置为 Fcitx 5 即可</p>
</li>
<li>
<p>安装中文词库</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">wget https://github.com/felixonmars/fcitx5-pinyin-zhwiki/releases/download/0.2.4/zhwiki-20231016.dict</span><br><span class="line">mkdir -p ~/.<span class="built_in">local</span>/share/fcitx5/pinyin/dictionaries/</span><br><span class="line">mv zhwiki-20231016.dict ~/.<span class="built_in">local</span>/share/fcitx5/pinyin/dictionaries/</span><br></pre></td></tr></table></figure>
<p>去<a target="_blank" rel="noopener" href="https://github.com/felixonmars/fcitx5-pinyin-zhwiki/releases">Releases · felixonmars/fcitx5-pinyin-zhwiki (github.com)</a>找最新的词库文件</p>
</li>
<li>
<p>配置bash_profile</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">GTK_IM_MODULE=fcitx</span><br><span class="line">QT_IM_MODULE=fcitx</span><br><span class="line">XMODIFIERS=@im=fcitx</span><br></pre></td></tr></table></figure>
</li>
<li>
<p>设置开机自启动</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line">gnome-tweaks</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">/**************/</span><br><span class="line">或者（未尝试）</span><br><span class="line">sudo vim /etc/rc.local</span><br><span class="line"></span><br><span class="line">#!/bin/bash</span><br><span class="line">sleep 5</span><br><span class="line">fcitx5 &amp;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">sudo chmod a+x /etc/rc.local</span><br><span class="line">sudo systemctl enable rc-local.service</span><br><span class="line"></span><br></pre></td></tr></table></figure>
</li>
<li>
<p>fcitx5配置</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">fcitx5-configtool</span><br></pre></td></tr></table></figure>
</li>
<li>
<p>gnome无法使用输入法解决（自带的火狐、vscode等）：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">gsettings <span class="built_in">set</span> org.gnome.settings-daemon.plugins.xsettings overrides <span class="string">&quot;&#123;&#x27;Gtk/IMModule&#x27;:&lt;&#x27;fcitx&#x27;&gt;&#125;&quot;</span></span><br></pre></td></tr></table></figure>
</li>
</ol>
<p>（未尝试）Jetbrains输入框在左下角问题解决：<a target="_blank" rel="noopener" href="https://github.com/RikudouPatrickstar/JetBrainsRuntime-for-Linux-x64">RikudouPatrickstar/JetBrainsRuntime-for-Linux-x64</a> 官方已跟进，但还未集成<a target="_blank" rel="noopener" href="https://youtrack.jetbrains.com/issue/JBR-2460">youtrack.jetbrains.com/issue/JBR-2460</a></p>
<h3 id="安装谷歌输入法">安装谷歌输入法<a class="header-anchor" href="#安装谷歌输入法"> ¶ </a></h3>
<p><strong>Ubuntu22.04不行</strong>，20.04可以</p>
<ol>
<li>
<p>安装谷歌拼音</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo apt-get install fcitx-googlepinyin -y</span><br></pre></td></tr></table></figure>
</li>
<li>
<p>打开软件<code>language support(语言支持)</code>，切换<code>Keyboard input method system(键盘输入法系统)</code>为<code>fcitx</code>，然后重启</p>
</li>
<li>
<p>重启后在右上角状态栏点击键盘图标，在下拉单里选择倒数第三个<code>Configure(配置)</code>进入配置界面。</p>
</li>
<li>
<p>左下角点<code>+</code>号，取消<code>Only Show Current Language(只选择当前语言)</code>勾选，搜索<code>Google</code>，选择<code>Google 拼音</code>并点击OK</p>
</li>
<li>
<p>切换输入法快捷键：<code>ctrl space</code></p>
</li>
</ol>
<h2 id="7-卸载自带软件">7. 卸载自带软件<a class="header-anchor" href="#7-卸载自带软件"> ¶ </a></h2>
<p><a target="_blank" rel="noopener" href="https://www.htcp.net/2568.html">https://www.htcp.net/2568.html</a></p>
<p>Ubuntu选择最小安装不会有这些东西</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">sudo apt purge gnome-mahjongg aisleriot gnome-mines gnome-sudoku</span><br><span class="line">sudo apt purge libreoffice-common thunderbird</span><br><span class="line">sudo apt purge rhythmbox simple-scan transmission-common</span><br></pre></td></tr></table></figure>
<h2 id="8-安装软件列表">8. 安装软件列表<a class="header-anchor" href="#8-安装软件列表"> ¶ </a></h2>
<h3 id="为64位系统提供32位运行环境支撑">为64位系统提供32位运行环境支撑<a class="header-anchor" href="#为64位系统提供32位运行环境支撑"> ¶ </a></h3>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">sudo dpkg --add-architecture i386</span><br><span class="line">sudo apt-get update</span><br><span class="line">sudo apt-get -y install lib32z1</span><br><span class="line">sudo apt-get -y install libc6-i386</span><br><span class="line">sudo apt-get -y install libc6-dev</span><br><span class="line">sudo apt-get install lib32stdc++6</span><br><span class="line">sudo apt-get install libstdc++6</span><br></pre></td></tr></table></figure>
<h3 id="安装pyenv">安装pyenv<a class="header-anchor" href="#安装pyenv"> ¶ </a></h3>
<p><a target="_blank" rel="noopener" href="https://github.com/pyenv/pyenv">https://github.com/pyenv/pyenv</a></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 安装依赖 https://github.com/pyenv/pyenv/wiki</span></span><br><span class="line"><span class="comment"># https://github.com/pyenv/pyenv/wiki/Common-build-problems#prerequisites</span></span><br><span class="line">sudo apt install build-essential libssl-dev zlib1g-dev \</span><br><span class="line">libbz2-dev libreadline-dev libsqlite3-dev curl \</span><br><span class="line">libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev </span><br><span class="line"></span><br><span class="line"><span class="comment">################################</span></span><br><span class="line">curl -L https://gitee.com/forgo7ten-mirrors/pyenv-installer/raw/master/bin/pyenv-installer | bash</span><br><span class="line"><span class="built_in">cd</span> ~/.pyenv &amp;&amp; src/configure &amp;&amp; make -C src</span><br><span class="line"><span class="comment">############################### 推荐</span></span><br><span class="line">pc curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer -o pyenv-installer</span><br><span class="line">pc bash pyenv-installer</span><br><span class="line"><span class="comment">################################ 原版</span></span><br><span class="line">curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash</span><br><span class="line"><span class="built_in">cd</span> ~/.pyenv &amp;&amp; src/configure &amp;&amp; make -C src</span><br><span class="line"><span class="comment">################################</span></span><br></pre></td></tr></table></figure>
<p>.bash_profile添加（配置到bashrc或zshrc）</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">#* 使用installer提示即可 *#</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># pyenv</span></span><br><span class="line"><span class="built_in">export</span> PYENV_ROOT=<span class="string">&quot;<span class="variable">$HOME</span>/.pyenv&quot;</span></span><br><span class="line"><span class="built_in">command</span> -v pyenv &gt;/dev/null || <span class="built_in">export</span> PATH=<span class="string">&quot;<span class="variable">$PYENV_ROOT</span>/bin:<span class="variable">$PATH</span>&quot;</span></span><br><span class="line"><span class="built_in">eval</span> <span class="string">&quot;<span class="subst">$(pyenv init -)</span>&quot;</span></span><br><span class="line"><span class="built_in">eval</span> <span class="string">&quot;<span class="subst">$(pyenv virtualenv-init -)</span>&quot;</span></span><br></pre></td></tr></table></figure>
<p>pyenv离线安装python：将下载的python包放在<code>~/.pyenv/cache </code>目录下</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">pyenv virtualenv 3.8.10 common</span><br><span class="line">pyenv global common</span><br><span class="line">pyenv virtualenv 3.8.10 frida_15_1_28</span><br><span class="line">pip install frida==15.1.28</span><br><span class="line">pip install frida-tools==10.8.0</span><br><span class="line">pip install objection==1.11.0</span><br></pre></td></tr></table></figure>
<h3 id="安装node-js">安装node.js<a class="header-anchor" href="#安装node-js"> ¶ </a></h3>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">sudo apt-get update</span><br><span class="line">sudo apt-get install -y ca-certificates curl gnupg</span><br><span class="line">sudo mkdir -p /etc/apt/keyrings</span><br><span class="line">curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg</span><br><span class="line">NODE_MAJOR=20</span><br><span class="line"><span class="built_in">echo</span> <span class="string">&quot;deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_<span class="variable">$NODE_MAJOR</span>.x nodistro main&quot;</span> | sudo tee /etc/apt/sources.list.d/nodesource.list</span><br><span class="line">sudo apt-get update</span><br><span class="line">sudo apt-get install nodejs -y</span><br></pre></td></tr></table></figure>
<p>新方法<a target="_blank" rel="noopener" href="https://github.com/nodesource/distributions#nodejs">nodesource/distributions： NodeSource Node.js 二进制发行版 (github.com)</a></p>
<p>npm换tb源：</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm config set registry https://registry.npm.taobao.org/</span><br></pre></td></tr></table></figure>
<hr>
<p>该方法即将被弃用，使用上述方法</p>
<p><a target="_blank" rel="noopener" href="https://www.cnblogs.com/feiquan/p/11223487.html">https://www.cnblogs.com/feiquan/p/11223487.html</a></p>
<p>这个16根据官网大版本号修改</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -</span><br><span class="line">sudo apt-get install -y nodejs</span><br></pre></td></tr></table></figure>
<h3 id="各种不需要配置软件">各种不需要配置软件<a class="header-anchor" href="#各种不需要配置软件"> ¶ </a></h3>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo apt install -y git python3 python3-venv python3-pip curl vim gcc net-tools tree jnettop p7zip-full htop proxychains open-vm-tools-desktop terminator zsh openssh-server</span><br></pre></td></tr></table></figure>
<table>
<thead>
<tr>
<th style="text-align:center">工具</th>
<th style="text-align:center">作用</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">tree</td>
<td style="text-align:center">tree -afNh 查找文件</td>
</tr>
<tr>
<td style="text-align:center">jnettop</td>
<td style="text-align:center">查看网络流量</td>
</tr>
<tr>
<td style="text-align:center">htop</td>
<td style="text-align:center">查看CPU占用</td>
</tr>
<tr>
<td style="text-align:center"></td>
<td style="text-align:center"></td>
</tr>
</tbody>
</table>
<h2 id="9-pip换源">9. pip换源<a class="header-anchor" href="#9-pip换源"> ¶ </a></h2>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">mkdir ~/.pip &amp;&amp; <span class="built_in">echo</span> <span class="string">&quot;[global]</span></span><br><span class="line"><span class="string">timeout = 6000</span></span><br><span class="line"><span class="string">index-url=https://pypi.tuna.tsinghua.edu.cn/simple </span></span><br><span class="line"><span class="string">extra-index-url=http://mirrors.aliyun.com/pypi/simple/</span></span><br><span class="line"><span class="string">                http://pypi.mirrors.ustc.edu.cn/simple/</span></span><br><span class="line"><span class="string">                https://pypi.org/</span></span><br><span class="line"><span class="string">[install]</span></span><br><span class="line"><span class="string">trusted-host=mirrors.aliyun.com</span></span><br><span class="line"><span class="string">             pypi.tuna.tsinghua.edu.cn</span></span><br><span class="line"><span class="string">             pypi.mirrors.ustc.edu.cn</span></span><br><span class="line"><span class="string">             pypi.org&quot;</span> &gt; ~/.pip/pip.conf</span><br></pre></td></tr></table></figure>
<p>(此处用的是清华大学的pip源，可自行更换pip源网址)</p>
<h2 id="10-vscode安装">10. vscode安装<a class="header-anchor" href="#10-vscode安装"> ¶ </a></h2>
<ol>
<li>
<p>Ubuntu自带软件中心中搜索Visual Studio Code下载，页面中就可以直接选择安装**（不推荐，不能使用谷歌拼音）**</p>
</li>
<li>
<p>从<a target="_blank" rel="noopener" href="https://code.visualstudio.com/">vscode官网</a>下载最新版本，下载<strong>deb包</strong><br>
安装命令：<code>dpkg -i 安装包</code></p>
</li>
<li>
<p>启动命令：<code>code</code></p>
</li>
<li>
<p>可以在左侧图标右键，<code>添加到收藏夹</code></p>
</li>
</ol>
<p><strong>命令行安装</strong></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">sudo apt-get install wget gpg</span><br><span class="line">wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor &gt; packages.microsoft.gpg</span><br><span class="line">sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg</span><br><span class="line">sudo sh -c <span class="string">&#x27;echo &quot;deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main&quot; &gt; /etc/apt/sources.list.d/vscode.list&#x27;</span></span><br><span class="line">rm -f packages.microsoft.gpg</span><br><span class="line">sudo apt install apt-transport-https</span><br><span class="line">sudo apt update</span><br><span class="line">sudo apt install code</span><br></pre></td></tr></table></figure>
<h2 id="11-安装java-OracleJDK">11. 安装java OracleJDK<a class="header-anchor" href="#11-安装java-OracleJDK"> ¶ </a></h2>
<ol>
<li>
<p>下载jdk压缩包，解压到相关位置（<code>/opt/</code>）</p>
</li>
<li>
<p>配置<code>.bashrc</code></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># JAVA jdk11 start</span></span><br><span class="line"><span class="built_in">export</span> JAVA_HOME=/opt/jdk-11.0.13</span><br><span class="line"><span class="built_in">export</span> CLASSPATH=.:<span class="variable">$JAVA_HOME</span>/lib</span><br><span class="line"><span class="built_in">export</span> PATH=<span class="variable">$JAVA_HOME</span>/bin:<span class="variable">$PATH</span></span><br><span class="line"><span class="comment"># java8-&gt;  export PATH=$JAVA_HOME/jre/bin:$PATH</span></span><br><span class="line"><span class="comment"># JAVA jdk11 end</span></span><br></pre></td></tr></table></figure>
</li>
</ol>
<h2 id="12-安装AndroidStudio">12. 安装AndroidStudio<a class="header-anchor" href="#12-安装AndroidStudio"> ¶ </a></h2>
<p>使用https://www.jetbrains.com/zh-cn/toolbox-app/</p>
<ol>
<li>
<p>去官网下载linux压缩包，解压到相关位置（<code>/opt/</code>）</p>
</li>
<li>
<p>寻找<code>/bin/studio.sh</code>文件，命令行打开</p>
</li>
<li>
<p>固定到左侧</p>
<ol>
<li>随便使用AndroidStudio新建一个项目</li>
<li>菜单栏选择<code>Tools</code>-&gt;<code>Create DesktopEntry</code>来创建快捷方式</li>
</ol>
</li>
<li>
<p>解决AndroidStudio无法调试问题</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo apt install libncurses5</span><br></pre></td></tr></table></figure>
</li>
<li>
<p>配置sdk目录，<code>~/.bashrc</code>中添加</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Android start</span></span><br><span class="line"><span class="comment"># 不确定这个是否有用</span></span><br><span class="line"><span class="built_in">export</span> ANDROID_SDK_HOME=<span class="string">&quot;<span class="variable">$HOME</span>/Android&quot;</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 配置sdk及ndk</span></span><br><span class="line"><span class="built_in">export</span> PATH=<span class="variable">$HOME</span>/Android/Sdk/tools:<span class="variable">$PATH</span></span><br><span class="line"><span class="built_in">export</span> PATH=<span class="variable">$HOME</span>/Android/Sdk/platform-tools:<span class="variable">$PATH</span></span><br><span class="line"><span class="built_in">export</span> PATH=<span class="variable">$HOME</span>/Android/Sdk/ndk/21.4.7075529:<span class="variable">$PATH</span></span><br><span class="line"><span class="built_in">export</span> PATH=<span class="variable">$HOME</span>/Android/Sdk/build-tools/30.0.3:<span class="variable">$PATH</span></span><br><span class="line"><span class="comment"># Android end</span></span><br></pre></td></tr></table></figure>
</li>
<li>
<p>配置adb usb</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">问题：</span><br><span class="line">List of devices attached</span><br><span class="line">FA77D0303724	no permissions (missing udev rules? user is <span class="keyword">in</span> the plugdev group); see [http://developer.android.com/tools/device.html]</span><br></pre></td></tr></table></figure>
<p><strong>两条命令解决</strong>（之后重插usb/重启）：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">sudo usermod -aG plugdev <span class="variable">$LOGNAME</span></span><br><span class="line">sudo apt-get install android-sdk-platform-tools-common</span><br></pre></td></tr></table></figure>
<p><strong>old：</strong></p>
<ol>
<li>
<p>运行<code>lsusb</code>，找到设备对应的ID值；前四位为PID, 后四位为VID</p>
<p><img src= "" data-lazy-src="/Env/Linux_environment_configuration_record/image-20211225011905208.png" alt="image-20211225011905208"></p>
</li>
<li>
<p>创建adb_usb.ini文件，写入android设备的VID**（非必须？）**</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">echo</span> 0x12d1 &gt; ~/.android/adb_usb.ini</span><br></pre></td></tr></table></figure>
</li>
<li>
<p>添加<code>.rule</code>规则</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">sudo vim /etc/udev/rules.d/70-android.rules</span><br><span class="line">SUBSYSTEM==<span class="string">&quot;usb&quot;</span>, ATTRS&#123;idVendor&#125;==<span class="string">&quot;18d1&quot;</span>, ATTRS&#123;idProduct&#125;==<span class="string">&quot;4ee7&quot;</span>,MODE=<span class="string">&quot;0666&quot;</span>,GROUP=<span class="string">&quot;plugdev&quot;</span>,symlink+=<span class="string">&quot;android&quot;</span>,symlink+=<span class="string">&quot;android_adb&quot;</span></span><br></pre></td></tr></table></figure>
<p>需要修改<code>ATTRS&#123;idVendor&#125;</code>和<code>ATTRS&#123;idProduct&#125;</code></p>
</li>
<li>
<p>赋予权限</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo chmod 666 /etc/udev/rules.d/70-android.rules</span><br></pre></td></tr></table></figure>
</li>
<li>
<p>重启usb服务</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo service udev restart</span><br></pre></td></tr></table></figure>
</li>
<li>
<p>重启adb</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">adb kill-server</span><br><span class="line">adb start-server</span><br><span class="line">adb devices</span><br></pre></td></tr></table></figure>
</li>
</ol>
</li>
</ol>
<h2 id="13-开机提示“检测到系统程序出现问题”">13. 开机提示“检测到系统程序出现问题”<a class="header-anchor" href="#13-开机提示“检测到系统程序出现问题”"> ¶ </a></h2>
<p>提示”检测到系统程序出现问题“；提示”ubuntu出现了内部错误“</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">sudo rm /var/crash/* <span class="comment"># 删除错误报告</span></span><br><span class="line">sudo gedit /etc/default/apport</span><br><span class="line"><span class="comment">#将enabled=1 改为 enabled=0</span></span><br></pre></td></tr></table></figure>
<h2 id="14-真机远程ssh连接虚拟机">14. 真机远程ssh连接虚拟机<a class="header-anchor" href="#14-真机远程ssh连接虚拟机"> ¶ </a></h2>
<p>虚拟机安装ssh-server</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo apt install -y openssh-server</span><br></pre></td></tr></table></figure>
<p>查看虚拟机ip地址：（或者<code>ifconfig</code>）</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hostname -I</span><br></pre></td></tr></table></figure>
<p>真机：</p>
<p>Git Bash中输入命令</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ssh [username]@[ipAddress]</span><br></pre></td></tr></table></figure>
<p><img src= "" data-lazy-src="/Env/Linux_environment_configuration_record/image-20211225013650672.png" alt="image-20211225013650672"></p>
<h3 id="虚拟机中配置ssh免密登录">虚拟机中配置ssh免密登录<a class="header-anchor" href="#虚拟机中配置ssh免密登录"> ¶ </a></h3>
<p>在客户端输入如下命令（输入被控端的user和ip）</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ssh-copy-id remoteuser@remotehost</span><br></pre></td></tr></table></figure>
<hr>
<p>Windows系统中，可以通过<code>git-bash</code>来使用该命令</p>
<h2 id="15-安装配置proxychains">15. 安装配置proxychains<a class="header-anchor" href="#15-安装配置proxychains"> ¶ </a></h2>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo apt install proxychains -y</span><br></pre></td></tr></table></figure>
<p>编辑配置</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo vim /etc/proxychains.conf</span><br></pre></td></tr></table></figure>
<p>最下方的<code>[ProxyList]</code>下的<code>socks4</code>注释掉，注释掉<code>proxy_dns</code></p>
<p>添加：ip填含有代理的主机ip；prot填监听端口（v2rayN为：设置-&gt;参数设置-&gt;基础设置-&gt;本地监听端口）</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">socks5 [ip] [port]</span><br></pre></td></tr></table></figure>
<p>注释掉<code>proxy_dns</code></p>
<p>名字太长 设置别名：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">sudo vim ~/.bash_aliases</span><br><span class="line">添加</span><br><span class="line"><span class="built_in">alias</span> pc=<span class="string">&#x27;proxychains&#x27;</span></span><br><span class="line"></span><br><span class="line">wq之后</span><br><span class="line"><span class="built_in">source</span> ~/.bash_aliases</span><br></pre></td></tr></table></figure>
<h2 id="环境变量">环境变量<a class="header-anchor" href="#环境变量"> ¶ </a></h2>
<p>.bash_profile</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">if</span> [ -f ~/.bash_aliases ]; <span class="keyword">then</span></span><br><span class="line">    . ~/.bash_aliases</span><br><span class="line"><span class="keyword">fi</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment"># proxy</span></span><br><span class="line"><span class="built_in">export</span> https_proxy=http://192.168.0.110:7890</span><br><span class="line"><span class="built_in">export</span> http_proxy=http://192.168.0.110:7890</span><br><span class="line"><span class="built_in">export</span> all_proxy=socks5://192.168.0.110:7890</span><br><span class="line"><span class="built_in">export</span> NO_PROXY=<span class="string">&quot;localhost,127.0.0.1,::1&quot;</span></span><br></pre></td></tr></table></figure>
<p>.bash_aliases</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">alias</span> pc=<span class="string">&#x27;proxychains&#x27;</span></span><br><span class="line"><span class="built_in">alias</span> openit=<span class="string">&#x27;nautilus . &amp;&#x27;</span></span><br><span class="line"><span class="built_in">alias</span> clear_proxy=<span class="string">&#x27;unset https_proxy;unset http_proxy;unset all_proxy&#x27;</span></span><br></pre></td></tr></table></figure>
<p>自写环境变量可添加到<code>.bash_profile</code>中，在<code>.bashrc</code>中添加<code>source .bash_profile</code></p>
<h1 id="拓展">拓展<a class="header-anchor" href="#拓展"> ¶ </a></h1>
<h2 id="Ubuntu打开文件夹命令">Ubuntu打开文件夹命令<a class="header-anchor" href="#Ubuntu打开文件夹命令"> ¶ </a></h2>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">nautilus .</span><br></pre></td></tr></table></figure>
<h2 id="Vmwaretools缓存目录">Vmwaretools缓存目录<a class="header-anchor" href="#Vmwaretools缓存目录"> ¶ </a></h2>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">rm -rf ~/.cache/vmware/drag_and_drop/</span><br></pre></td></tr></table></figure>
<h2 id="vm虚拟机速度优化">vm虚拟机速度优化<a class="header-anchor" href="#vm虚拟机速度优化"> ¶ </a></h2>
<ol>
<li>优化快照速度：<br>
vm虚拟机菜单栏→编辑→首选项→优先级→【取消对勾】尽可能在后台拍摄/还原快照</li>
<li>vm虚拟机菜单栏→编辑→首选项→<br>
优先级→抓取的输入内容(高)<br>
内存→【勾选】调整所有虚拟机内存使其适应预留的主机RAM</li>
<li>编辑虚拟机设置→高级→抓取的输入内容(高)<br>
【勾选】禁用内存页面修整</li>
</ol>
<h2 id="安装VMwareTools">安装VMwareTools<a class="header-anchor" href="#安装VMwareTools"> ¶ </a></h2>
<p><a target="_blank" rel="noopener" href="https://docs.vmware.com/cn/VMware-Workstation-Pro/15.0/com.vmware.ws.using.doc/GUID-08BB9465-D40A-4E16-9E15-8C016CC8166F.html">在 Linux 虚拟机中手动安装 VMware Tools</a><br>
（将VMtools安装包解压到目录，在目录里管理员运行<code>vmware-install.pl</code>即可）<strong>【弃用】</strong></p>
<p>现使用：安装VMwareTools</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo apt install open-vm-tools-desktop</span><br></pre></td></tr></table></figure>
<h2 id="修改Ubuntu短密码">修改Ubuntu短密码<a class="header-anchor" href="#修改Ubuntu短密码"> ¶ </a></h2>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">sudo passwd  <span class="comment"># 修改root密码</span></span><br><span class="line">sudo passwd [username]  <span class="comment"># 修改某用户密码</span></span><br></pre></td></tr></table></figure>
<p>按提示修改密码</p>
<h2 id="突然连不上网，网络图标消失">突然连不上网，网络图标消失<a class="header-anchor" href="#突然连不上网，网络图标消失"> ¶ </a></h2>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo service network-manager restart</span><br></pre></td></tr></table></figure>
<p>ubuntu20</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">service NetworkManager stop</span><br><span class="line">sudo rm /var/lib/NetworkManager/NetworkManager.state</span><br><span class="line">service NetworkManager start</span><br></pre></td></tr></table></figure>
<p>修改<code>/etc/NetworkManager/NetworkManager.conf</code><br>
<code>managed=true</code></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo service network-manager restart</span><br></pre></td></tr></table></figure>
<h2 id="Ubuntu系统更新软件">Ubuntu系统更新软件<a class="header-anchor" href="#Ubuntu系统更新软件"> ¶ </a></h2>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">sudo apt-get update</span><br><span class="line">升级安装包相关的命令,刷新可安装的软件列表(但是不做任何实际的安装动作)</span><br><span class="line"></span><br><span class="line">sudo apt-get upgrade</span><br><span class="line">进行安装包的更新(软件版本的升级)</span><br></pre></td></tr></table></figure>
<h2 id="Ubuntu16-04安装ibus中文输入法">Ubuntu16.04安装ibus中文输入法<a class="header-anchor" href="#Ubuntu16-04安装ibus中文输入法"> ¶ </a></h2>
<p><strong>[现推荐谷歌拼音输入法](#6. 安装谷歌输入法)</strong></p>
<ol>
<li>
<p>安装Chinese语言包</p>
</li>
<li>
<p>安装ibus拼音</p>
 <figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo apt-get install ibus-pinyin</span><br></pre></td></tr></table></figure>
</li>
<li>
<p><code>sudo ibus-setup</code></p>
</li>
<li>
<p><strong>重启系统</strong></p>
</li>
<li>
<p><code>sudo ibus-setup</code>打开ibus首选项</p>
<p><img src= "" data-lazy-src="https://img-blog.csdnimg.cn/2020020522324094.png" alt="在这里插入图片描述"></p>
</li>
<li>
<p>Ubuntu系统设置→文本输入(Text Entry)</p>
<p>添加上ibus拼音输入法<br>
<img src= "" data-lazy-src="https://img-blog.csdnimg.cn/20200205223452263.png" alt="在这里插入图片描述"><br>
<img src= "" data-lazy-src="https://img-blog.csdnimg.cn/202002052238526.png" alt="在这里插入图片描述"></p>
</li>
</ol>
<h2 id="无法锁定管理目录-var-lib-dpkg">无法锁定管理目录(/var/lib/dpkg/)<a class="header-anchor" href="#无法锁定管理目录-var-lib-dpkg"> ¶ </a></h2>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">sudo rm /var/cache/apt/archives/lock</span><br><span class="line">sudo rm /var/lib/dpkg/lock</span><br></pre></td></tr></table></figure>
<p>无法获得锁</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">sudo rm /var/lib/dpkg/lock</span><br><span class="line"><span class="comment"># 强制删除锁所在目录</span></span><br></pre></td></tr></table></figure>
<blockquote>
<p>E: 无法获得锁 /var/lib/apt/lists/lock - open (11: 资源暂时不可用)<br>
E: 无法对目录 /var/lib/apt/lists/ 加锁</p>
</blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo rm /var/lib/apt/lists/lock</span><br></pre></td></tr></table></figure>
<h2 id="apt-get系列命令">apt-get系列命令<a class="header-anchor" href="#apt-get系列命令"> ¶ </a></h2>
<h3 id="卸载软件">卸载软件<a class="header-anchor" href="#卸载软件"> ¶ </a></h3>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">sudo apt-get remove &lt;软件名&gt;  <span class="comment">#只删除软件</span></span><br><span class="line">sudo apt-get purge &lt;软件名&gt;   <span class="comment">#删除软件及其配置文件</span></span><br></pre></td></tr></table></figure>
<h3 id="删除软件安装包">删除软件安装包<a class="header-anchor" href="#删除软件安装包"> ¶ </a></h3>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo apt-get clean</span><br></pre></td></tr></table></figure>
<p><strong>除非必要，不要使用sudo apt-get autoremove</strong>（虽然好像没啥事）</p>
<h1 id="【Archived】">【Archived】<a class="header-anchor" href="#【Archived】"> ¶ </a></h1>
<p>学习初期写下的记录，可能有不少错误，仅供参考</p>
<h2 id="ubuntu16-04升级python到3-7">ubuntu16.04升级python到3.7<a class="header-anchor" href="#ubuntu16-04升级python到3-7"> ¶ </a></h2>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br></pre></td><td class="code"><pre><span class="line">sudo add-apt-repository ppa:deadsnakes/ppa</span><br><span class="line"><span class="comment"># 添加自定义源</span></span><br><span class="line">sudo apt-get update</span><br><span class="line"><span class="comment"># 更新软件包</span></span><br><span class="line">sudo apt-get install python3.7</span><br><span class="line"><span class="comment"># 安装python3.7</span></span><br><span class="line">sudo apt-get -y install python3.7 python3.7-dev python3-pip</span><br><span class="line"><span class="comment"># 安装python3.7-dev啥玩意和pip</span></span><br><span class="line">python3.7 -m pip install pip --upgrade</span><br><span class="line">pip install --upgrade pip</span><br><span class="line"><span class="comment"># 升级pip</span></span><br><span class="line">sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.5 1</span><br><span class="line">sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.7 2</span><br><span class="line"><span class="comment"># 设置python的时候出来python3.7</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 设置python3时候出来python3.7</span></span><br><span class="line">1. 打开.bashrc</span><br><span class="line"> 	vim ~/.bashrc</span><br><span class="line"> 2. 在.bashrc中添加</span><br><span class="line"> 	<span class="built_in">alias</span> python3=python3.7</span><br><span class="line"> 	or</span><br><span class="line"> 	<span class="built_in">alias</span> python3=<span class="string">&#x27;/usr/bin/python3.7&#x27;</span></span><br><span class="line"> 3. 保存并退出文件编辑，使配置生效</span><br><span class="line"> 	<span class="built_in">source</span> ~/.bashrc</span><br><span class="line"> 	</span><br><span class="line"><span class="comment"># 更改软链接，设置默认唤起python3版本</span></span><br><span class="line">sudo rm /usr/bin/python</span><br><span class="line">sudo ln -s /usr/bin/python3 /usr/bin/python</span><br></pre></td></tr></table></figure>
<h2 id="ctf环境安装">ctf环境安装<a class="header-anchor" href="#ctf环境安装"> ¶ </a></h2>
<h3 id="安装PWNGDB">安装PWNGDB<a class="header-anchor" href="#安装PWNGDB"> ¶ </a></h3>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">sudo apt install git</span><br><span class="line">git <span class="built_in">clone</span> https://github.com/pwndbg/pwndbg</span><br><span class="line"><span class="built_in">cd</span> pwndbg</span><br><span class="line">sudo ./setup.sh</span><br></pre></td></tr></table></figure>
<p>若报错<br>
<img src= "" data-lazy-src="https://img-blog.csdnimg.cn/20200205154022351.png" alt="在这里插入图片描述"><br>
改为<code>sudo -H ./setup.sh</code></p>
<p><strong>安装完后pwngdb文件夹不能删除</strong></p>
<h3 id="安装peda">安装peda<a class="header-anchor" href="#安装peda"> ¶ </a></h3>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">git <span class="built_in">clone</span> https://github.com/longld/peda.git ~/peda</span><br><span class="line"><span class="built_in">echo</span> <span class="string">&quot;source ~/peda/peda.py&quot;</span> &gt;&gt; ~/.gdbinit</span><br></pre></td></tr></table></figure>
<h3 id="安装python">安装python<a class="header-anchor" href="#安装python"> ¶ </a></h3>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo apt-get install python3</span><br></pre></td></tr></table></figure>
<h3 id="安装pwntools">安装pwntools<a class="header-anchor" href="#安装pwntools"> ¶ </a></h3>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">sudo apt-get update</span><br><span class="line">sudo apt-get install python2.7 python-pip python-dev git libssl-dev libffi-dev build-essential</span><br><span class="line">sudo pip install --upgrade pip</span><br><span class="line">sudo pip install --upgrade pwntools</span><br></pre></td></tr></table></figure>
<p>安装过程中如果报“error in cryptography setup command: Invalid environment marker: python_version &lt; ‘3’”这个错误<br>
解决方法：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">pip install --upgrade setuptools</span><br></pre></td></tr></table></figure>
<p>通过在python中输入<code>from pwn import * </code>来验证是否安装成功</p>
<h3 id="安装OneGadget">安装OneGadget<a class="header-anchor" href="#安装OneGadget"> ¶ </a></h3>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">sudo apt-get -y install ruby</span><br><span class="line">sudo gem install one_gadget</span><br></pre></td></tr></table></figure>
<h3 id="安装OneGadget-2">安装OneGadget<a class="header-anchor" href="#安装OneGadget-2"> ¶ </a></h3>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">git <span class="built_in">clone</span> https://github.com/JonathanSalwan/ROPgadget.git</span><br><span class="line"><span class="built_in">cd</span> ROPgadget</span><br><span class="line">sudo python setup.py install</span><br></pre></td></tr></table></figure>
<h3 id="gcc编译环境安装">gcc编译环境安装<a class="header-anchor" href="#gcc编译环境安装"> ¶ </a></h3>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo apt-get install gcc</span><br></pre></td></tr></table></figure>
<h3 id="qira调试工具安装">qira调试工具安装<a class="header-anchor" href="#qira调试工具安装"> ¶ </a></h3>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">git <span class="built_in">clone</span> https://github.com/BinaryAnalysisPlatform/qira.git</span><br><span class="line"><span class="built_in">cd</span> qira/</span><br><span class="line">./install.sh</span><br></pre></td></tr></table></figure>
<p>安装后使用<code>qira -s /bin/ls</code>来测试是否安装成功</p>
<p>如果报TypeError: type object got multiple values for keyword argument ‘log’ 错误<br>
解决方法：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">source</span> &lt;qira-dir&gt;/venv/bin/activate</span><br><span class="line">pip uninstall Flask-SocketIO</span><br><span class="line">pip install Flask-SocketIO==2.9.1</span><br><span class="line">deactivate</span><br></pre></td></tr></table></figure>
<h2 id="python库安装">python库安装<a class="header-anchor" href="#python库安装"> ¶ </a></h2>
<h3 id="z3约束器安装">z3约束器安装<a class="header-anchor" href="#z3约束器安装"> ¶ </a></h3>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">git <span class="built_in">clone</span> https://github.com/angr/angr-z3.git</span><br><span class="line"><span class="built_in">cd</span> angr-z3</span><br><span class="line">python scripts/mk_make.py</span><br><span class="line"><span class="built_in">cd</span> build</span><br><span class="line">make</span><br><span class="line">sudo make install</span><br></pre></td></tr></table></figure>
<p>其中第三个命令有参数，自定义z3包的安装位置</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 示例 python2安装z3</span></span><br><span class="line">python scripts/mk_make.py --prefix=/home/palmer --python --pypkgdir=/home/palmer/.<span class="built_in">local</span>/lib/python2.7/site-packages</span><br><span class="line"><span class="comment"># 示例 python3安装z3</span></span><br><span class="line">python3 scripts/mk_make.py --prefix=/home/cx330 --python --pypkgdir=/home/cx330/.<span class="built_in">local</span>/lib/python3.6/site-packages</span><br><span class="line"></span><br><span class="line">python scripts/mk_make.py --prefix=想安装到的目录 --python --pypkgdir=你的python第三方库地址</span><br><span class="line">prefix 我设置的用户根目录</span><br><span class="line">pypkgdir 去找python的包目录</span><br></pre></td></tr></table></figure>
<p><img src= "" data-lazy-src="https://img-blog.csdnimg.cn/20200205115602578.png" alt="在这里插入图片描述"><br>
<img src= "" data-lazy-src="https://img-blog.csdnimg.cn/20200205122644145.png" alt="在这里插入图片描述"></p>
<h3 id="python安装gmpy2库">python安装gmpy2库<a class="header-anchor" href="#python安装gmpy2库"> ¶ </a></h3>
<ol>
<li>安装三个依赖库gmp mpfr mpc</li>
</ol>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">sudo apt-get install libgmp-dev</span><br><span class="line">sudo apt-get install libmpfr-dev</span><br><span class="line">sudo apt-get install libmpc-dev</span><br></pre></td></tr></table></figure>
<ol start="2">
<li>gmpy2 安装</li>
</ol>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">sudo pip3 install gmpy2</span><br><span class="line"><span class="comment">#或者</span></span><br><span class="line">sudo pip install gmpy2</span><br></pre></td></tr></table></figure>
<h3 id="python安装Angr">python安装Angr<a class="header-anchor" href="#python安装Angr"> ¶ </a></h3>
<ol>
<li>安装依赖</li>
</ol>
<p>（最好安装虚拟环境）</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">sudo apt-get install python-dev libffi-dev build-essential virtualenvwrapper</span><br><span class="line"><span class="comment">#第二步报错 mkvirtualenv未找到命令 时，执行下面一条/两条命令</span></span><br><span class="line"></span><br><span class="line"><span class="comment">#export WORKON_HOME=$HOME/Python-workhome</span></span><br><span class="line"><span class="built_in">source</span> /usr/share/virtualenvwrapper/virtualenvwrapper.sh</span><br></pre></td></tr></table></figure>
<ol start="2">
<li>安装angr</li>
</ol>
  <figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">mkvirtualenv --python=$(<span class="built_in">which</span> python3) angr &amp;&amp; pip install angr</span><br></pre></td></tr></table></figure>
<ul>
<li>
<p>若报错：ERROR: pyvex 7.8.9.26 has requi rement future=-0.16.0, but you’ll have future 0.18.2 which is incompatible.<br>
将python2和python3的future均改为0.16.0版本<br>
命令：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">sudo pip uninstall future</span><br><span class="line">sudo pip install future==0.16.0</span><br><span class="line">sudo pip3 uninstall future</span><br><span class="line">sudo pip3 install future==0.16.0</span><br></pre></td></tr></table></figure>
</li>
</ul>
<p>官方文档：<a target="_blank" rel="noopener" href="https://github.com/a7vinx/angr-doc-zh_CN/blob/master/INSTALL.md">angr官方文档</a> || <a target="_blank" rel="noopener" href="https://docs.angr.io/">angr使用文档</a></p>
<h3 id="python安装pysm4库">python安装pysm4库<a class="header-anchor" href="#python安装pysm4库"> ¶ </a></h3>
<p>**安装完成后pysm4文件夹不能删除！！**提前选好安装位置</p>
<p>(好像可以删除)</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">git <span class="built_in">clone</span> https://github.com/yang3yen/pysm4.git</span><br><span class="line"><span class="built_in">cd</span> pysm4</span><br><span class="line">sudo python setup.py install</span><br><span class="line"><span class="comment"># 默认python2安装，python3请特指</span></span><br></pre></td></tr></table></figure>
<h3 id="python安装pycrypto，pycrytodome和crypto">python安装pycrypto，pycrytodome和crypto<a class="header-anchor" href="#python安装pycrypto，pycrytodome和crypto"> ¶ </a></h3>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">pip install pycryptodome</span><br></pre></td></tr></table></figure>
<p>即可安装</p>
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="mailto:undefined">Forgo7ten</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="https://forgo7ten.github.io/Env/Linux_environment_configuration_record/">https://forgo7ten.github.io/Env/Linux_environment_configuration_record/</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="https://Forgo7ten.github.io" target="_blank">Forgo7ten'blog</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/%E5%B7%A5%E5%85%B7-%E7%8E%AF%E5%A2%83%E8%B0%83%E6%95%99/">工具&amp;环境调教</a></div><div class="post_share"><div class="social-share" data-image="http://forgo7ten.gitee.io/store/imgs/12.jpg" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/social-share.js/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/social-share.js/dist/js/social-share.min.js" defer></script></div></div><div class="post-reward"><div class="reward-button"><i class="fas fa-qrcode"></i> 打赏</div><div class="reward-main"><ul class="reward-all"><li class="reward-item"><a href="/images/wechat.png" target="_blank"><img class="post-qr-code-img" src="/images/wechat.png" alt="wechat"/></a><div class="post-qr-code-desc">wechat</div></li><li class="reward-item"><a href="/images/alipay.jpg" target="_blank"><img class="post-qr-code-img" src="/images/alipay.jpg" alt="alipay"/></a><div class="post-qr-code-desc">alipay</div></li></ul></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/Reverse/2020/Preliminary_analysis_of_virus_samples/"><img class="prev-cover" src="http://forgo7ten.gitee.io/store/imgs/2.jpg" onerror="onerror=null;src='/img/404.jpg'" alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">样本分析初战</div></div></a></div><div class="next-post pull-right"><a href="/Env/Vim_usage_quick_check/"><img class="next-cover" src="http://forgo7ten.gitee.io/store/imgs/17.jpg" onerror="onerror=null;src='/img/404.jpg'" alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">【工具调教】Vim使用速查</div></div></a></div></nav><div class="relatedPosts"><div class="headline"><i class="fas fa-thumbs-up fa-fw"></i><span>相关推荐</span></div><div class="relatedPosts-list"><div><a href="/Env/VSCode_self-use_plugin_record/" title="【工具调教】VS Code 自用插件记录"><img class="cover" src="http://forgo7ten.gitee.io/store/imgs/8.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2021-01-01</div><div class="title">【工具调教】VS Code 自用插件记录</div></div></a></div><div><a href="/Env/IDEA_initialization_configuration_and_plugins/" title="【工具调教】IDEA初始化配置 & 插件收集"><img class="cover" src="http://forgo7ten.gitee.io/store/imgs/5.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2021-01-01</div><div class="title">【工具调教】IDEA初始化配置 & 插件收集</div></div></a></div><div><a href="/Env/Vim_usage_quick_check/" title="【工具调教】Vim使用速查"><img class="cover" src="http://forgo7ten.gitee.io/store/imgs/17.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2021-01-01</div><div class="title">【工具调教】Vim使用速查</div></div></a></div></div></div><hr/><div id="post-comment"><div class="comment-head"><div class="comment-headline"><i class="fas fa-comments fa-fw"></i><span> 评论</span></div></div><div class="comment-wrap"><div><div id="gitalk-container"></div></div></div></div></div><div class="aside-content" id="aside-content"><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span><span class="toc-percentage"></span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#ubuntu%E8%99%9A%E6%8B%9F%E6%9C%BA%E5%AE%89%E8%A3%85"><span class="toc-number">1.</span> <span class="toc-text">ubuntu虚拟机安装</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#Init"><span class="toc-number">2.</span> <span class="toc-text">Init</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%AE%89%E8%A3%85Ubuntu%E6%97%B6%E5%80%99%E8%AF%AD%E8%A8%80%E9%80%89%E6%8B%A9%E9%BB%98%E8%AE%A4%E8%8B%B1%E6%96%87"><span class="toc-number">2.1.</span> <span class="toc-text">安装Ubuntu时候语言选择默认英文</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#0-%E8%AE%BE%E7%BD%AEroot%E5%AF%86%E7%A0%81"><span class="toc-number">2.2.</span> <span class="toc-text">0. 设置root密码</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#1-%E5%85%88%E6%9B%B4%E6%96%B0%E6%BA%90"><span class="toc-number">2.3.</span> <span class="toc-text">1. 先更新源</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#2-%E5%AE%89%E8%A3%85VMwareTools"><span class="toc-number">2.4.</span> <span class="toc-text">2. 安装VMwareTools</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#3-Ubuntu%E6%8D%A2%E6%BA%90"><span class="toc-number">2.5.</span> <span class="toc-text">3. Ubuntu换源</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#4-%E6%9B%B4%E6%96%B0%E7%B3%BB%E7%BB%9F%E8%BD%AF%E4%BB%B6"><span class="toc-number">2.6.</span> <span class="toc-text">4. 更新系统软件</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#5-%E6%9B%B4%E6%8D%A2%E7%BB%88%E7%AB%AF"><span class="toc-number">2.7.</span> <span class="toc-text">5. 更换终端</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%AE%89%E8%A3%85Terminator"><span class="toc-number">2.7.1.</span> <span class="toc-text">安装Terminator</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%AE%89%E8%A3%85zsh"><span class="toc-number">2.7.2.</span> <span class="toc-text">安装zsh</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#5-optional-%E5%B0%86Ubuntu%E7%B3%BB%E7%BB%9F%E8%AF%AD%E8%A8%80%E6%9B%B4%E6%8D%A2%E4%B8%BA%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87"><span class="toc-number">2.8.</span> <span class="toc-text">5(optional). 将Ubuntu系统语言更换为简体中文</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#6-%E5%AE%89%E8%A3%85%E8%BE%93%E5%85%A5%E6%B3%95"><span class="toc-number">2.9.</span> <span class="toc-text">6. 安装输入法</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%AE%89%E8%A3%85Fcitx5"><span class="toc-number">2.9.1.</span> <span class="toc-text">安装Fcitx5</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%AE%89%E8%A3%85%E8%B0%B7%E6%AD%8C%E8%BE%93%E5%85%A5%E6%B3%95"><span class="toc-number">2.9.2.</span> <span class="toc-text">安装谷歌输入法</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#7-%E5%8D%B8%E8%BD%BD%E8%87%AA%E5%B8%A6%E8%BD%AF%E4%BB%B6"><span class="toc-number">2.10.</span> <span class="toc-text">7. 卸载自带软件</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#8-%E5%AE%89%E8%A3%85%E8%BD%AF%E4%BB%B6%E5%88%97%E8%A1%A8"><span class="toc-number">2.11.</span> <span class="toc-text">8. 安装软件列表</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%B8%BA64%E4%BD%8D%E7%B3%BB%E7%BB%9F%E6%8F%90%E4%BE%9B32%E4%BD%8D%E8%BF%90%E8%A1%8C%E7%8E%AF%E5%A2%83%E6%94%AF%E6%92%91"><span class="toc-number">2.11.1.</span> <span class="toc-text">为64位系统提供32位运行环境支撑</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%AE%89%E8%A3%85pyenv"><span class="toc-number">2.11.2.</span> <span class="toc-text">安装pyenv</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%AE%89%E8%A3%85node-js"><span class="toc-number">2.11.3.</span> <span class="toc-text">安装node.js</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%90%84%E7%A7%8D%E4%B8%8D%E9%9C%80%E8%A6%81%E9%85%8D%E7%BD%AE%E8%BD%AF%E4%BB%B6"><span class="toc-number">2.11.4.</span> <span class="toc-text">各种不需要配置软件</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#9-pip%E6%8D%A2%E6%BA%90"><span class="toc-number">2.12.</span> <span class="toc-text">9. pip换源</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#10-vscode%E5%AE%89%E8%A3%85"><span class="toc-number">2.13.</span> <span class="toc-text">10. vscode安装</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#11-%E5%AE%89%E8%A3%85java-OracleJDK"><span class="toc-number">2.14.</span> <span class="toc-text">11. 安装java OracleJDK</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#12-%E5%AE%89%E8%A3%85AndroidStudio"><span class="toc-number">2.15.</span> <span class="toc-text">12. 安装AndroidStudio</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#13-%E5%BC%80%E6%9C%BA%E6%8F%90%E7%A4%BA%E2%80%9C%E6%A3%80%E6%B5%8B%E5%88%B0%E7%B3%BB%E7%BB%9F%E7%A8%8B%E5%BA%8F%E5%87%BA%E7%8E%B0%E9%97%AE%E9%A2%98%E2%80%9D"><span class="toc-number">2.16.</span> <span class="toc-text">13. 开机提示“检测到系统程序出现问题”</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#14-%E7%9C%9F%E6%9C%BA%E8%BF%9C%E7%A8%8Bssh%E8%BF%9E%E6%8E%A5%E8%99%9A%E6%8B%9F%E6%9C%BA"><span class="toc-number">2.17.</span> <span class="toc-text">14. 真机远程ssh连接虚拟机</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E8%99%9A%E6%8B%9F%E6%9C%BA%E4%B8%AD%E9%85%8D%E7%BD%AEssh%E5%85%8D%E5%AF%86%E7%99%BB%E5%BD%95"><span class="toc-number">2.17.1.</span> <span class="toc-text">虚拟机中配置ssh免密登录</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#15-%E5%AE%89%E8%A3%85%E9%85%8D%E7%BD%AEproxychains"><span class="toc-number">2.18.</span> <span class="toc-text">15. 安装配置proxychains</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F"><span class="toc-number">2.19.</span> <span class="toc-text">环境变量</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E6%8B%93%E5%B1%95"><span class="toc-number">3.</span> <span class="toc-text">拓展</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#Ubuntu%E6%89%93%E5%BC%80%E6%96%87%E4%BB%B6%E5%A4%B9%E5%91%BD%E4%BB%A4"><span class="toc-number">3.1.</span> <span class="toc-text">Ubuntu打开文件夹命令</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Vmwaretools%E7%BC%93%E5%AD%98%E7%9B%AE%E5%BD%95"><span class="toc-number">3.2.</span> <span class="toc-text">Vmwaretools缓存目录</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#vm%E8%99%9A%E6%8B%9F%E6%9C%BA%E9%80%9F%E5%BA%A6%E4%BC%98%E5%8C%96"><span class="toc-number">3.3.</span> <span class="toc-text">vm虚拟机速度优化</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%AE%89%E8%A3%85VMwareTools"><span class="toc-number">3.4.</span> <span class="toc-text">安装VMwareTools</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E4%BF%AE%E6%94%B9Ubuntu%E7%9F%AD%E5%AF%86%E7%A0%81"><span class="toc-number">3.5.</span> <span class="toc-text">修改Ubuntu短密码</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%AA%81%E7%84%B6%E8%BF%9E%E4%B8%8D%E4%B8%8A%E7%BD%91%EF%BC%8C%E7%BD%91%E7%BB%9C%E5%9B%BE%E6%A0%87%E6%B6%88%E5%A4%B1"><span class="toc-number">3.6.</span> <span class="toc-text">突然连不上网，网络图标消失</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Ubuntu%E7%B3%BB%E7%BB%9F%E6%9B%B4%E6%96%B0%E8%BD%AF%E4%BB%B6"><span class="toc-number">3.7.</span> <span class="toc-text">Ubuntu系统更新软件</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Ubuntu16-04%E5%AE%89%E8%A3%85ibus%E4%B8%AD%E6%96%87%E8%BE%93%E5%85%A5%E6%B3%95"><span class="toc-number">3.8.</span> <span class="toc-text">Ubuntu16.04安装ibus中文输入法</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%97%A0%E6%B3%95%E9%94%81%E5%AE%9A%E7%AE%A1%E7%90%86%E7%9B%AE%E5%BD%95-var-lib-dpkg"><span class="toc-number">3.9.</span> <span class="toc-text">无法锁定管理目录(&#x2F;var&#x2F;lib&#x2F;dpkg&#x2F;)</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#apt-get%E7%B3%BB%E5%88%97%E5%91%BD%E4%BB%A4"><span class="toc-number">3.10.</span> <span class="toc-text">apt-get系列命令</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%8D%B8%E8%BD%BD%E8%BD%AF%E4%BB%B6"><span class="toc-number">3.10.1.</span> <span class="toc-text">卸载软件</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%88%A0%E9%99%A4%E8%BD%AF%E4%BB%B6%E5%AE%89%E8%A3%85%E5%8C%85"><span class="toc-number">3.10.2.</span> <span class="toc-text">删除软件安装包</span></a></li></ol></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E3%80%90Archived%E3%80%91"><span class="toc-number">4.</span> <span class="toc-text">【Archived】</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#ubuntu16-04%E5%8D%87%E7%BA%A7python%E5%88%B03-7"><span class="toc-number">4.1.</span> <span class="toc-text">ubuntu16.04升级python到3.7</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#ctf%E7%8E%AF%E5%A2%83%E5%AE%89%E8%A3%85"><span class="toc-number">4.2.</span> <span class="toc-text">ctf环境安装</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%AE%89%E8%A3%85PWNGDB"><span class="toc-number">4.2.1.</span> <span class="toc-text">安装PWNGDB</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%AE%89%E8%A3%85peda"><span class="toc-number">4.2.2.</span> <span class="toc-text">安装peda</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%AE%89%E8%A3%85python"><span class="toc-number">4.2.3.</span> <span class="toc-text">安装python</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%AE%89%E8%A3%85pwntools"><span class="toc-number">4.2.4.</span> <span class="toc-text">安装pwntools</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%AE%89%E8%A3%85OneGadget"><span class="toc-number">4.2.5.</span> <span class="toc-text">安装OneGadget</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%AE%89%E8%A3%85OneGadget-2"><span class="toc-number">4.2.6.</span> <span class="toc-text">安装OneGadget</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#gcc%E7%BC%96%E8%AF%91%E7%8E%AF%E5%A2%83%E5%AE%89%E8%A3%85"><span class="toc-number">4.2.7.</span> <span class="toc-text">gcc编译环境安装</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#qira%E8%B0%83%E8%AF%95%E5%B7%A5%E5%85%B7%E5%AE%89%E8%A3%85"><span class="toc-number">4.2.8.</span> <span class="toc-text">qira调试工具安装</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#python%E5%BA%93%E5%AE%89%E8%A3%85"><span class="toc-number">4.3.</span> <span class="toc-text">python库安装</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#z3%E7%BA%A6%E6%9D%9F%E5%99%A8%E5%AE%89%E8%A3%85"><span class="toc-number">4.3.1.</span> <span class="toc-text">z3约束器安装</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#python%E5%AE%89%E8%A3%85gmpy2%E5%BA%93"><span class="toc-number">4.3.2.</span> <span class="toc-text">python安装gmpy2库</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#python%E5%AE%89%E8%A3%85Angr"><span class="toc-number">4.3.3.</span> <span class="toc-text">python安装Angr</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#python%E5%AE%89%E8%A3%85pysm4%E5%BA%93"><span class="toc-number">4.3.4.</span> <span class="toc-text">python安装pysm4库</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#python%E5%AE%89%E8%A3%85pycrypto%EF%BC%8Cpycrytodome%E5%92%8Ccrypto"><span class="toc-number">4.3.5.</span> <span class="toc-text">python安装pycrypto，pycrytodome和crypto</span></a></li></ol></li></ol></li></ol></div></div></div></div></main><footer id="footer" style="background-image: url('http://forgo7ten.gitee.io/store/imgs/12.jpg')"><div id="footer-wrap"><div class="copyright">&copy;2020 - 2023 By Forgo7ten</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div><div class="footer_custom_text">Hi, welcome to my <a href="https://Forgo7ten.github.io/">blog</a>!</div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="translateLink" type="button" title="简繁转换">繁</button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><a id="to_comment" href="#post-comment" title="直达评论"><i class="fas fa-comments"></i></a><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div id="local-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">本地搜索</span><span id="loading-status"></span><button class="search-close-button"><i class="fas fa-times"></i></button></nav><div class="is-center" id="loading-database"><i class="fas fa-spinner fa-pulse"></i><span>  数据库加载中</span></div><div class="search-wrap"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div><hr/><div id="local-search-results"></div></div></div><div id="search-mask"></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="/js/tw_cn.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.umd.js"></script><script src="https://cdn.jsdelivr.net/npm/instant.page/instantpage.min.js" type="module"></script><script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload/dist/lazyload.iife.min.js"></script><script src="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.js"></script><script src="/js/search/local-search.js"></script><script>var preloader = {
  endLoading: () => {
    document.body.style.overflow = 'auto';
    document.getElementById('loading-box').classList.add("loaded")
  },
  initLoading: () => {
    document.body.style.overflow = '';
    document.getElementById('loading-box').classList.remove("loaded")

  }
}
window.addEventListener('load',preloader.endLoading())</script><div class="js-pjax"><script>function addGitalkSource () {
  const ele = document.createElement('link')
  ele.rel = 'stylesheet'
  ele.href= 'https://cdn.jsdelivr.net/npm/gitalk/dist/gitalk.min.css'
  document.getElementsByTagName('head')[0].appendChild(ele)
}

function loadGitalk () {
  function initGitalk () {
    var gitalk = new Gitalk(Object.assign({
      clientID: '9e01c692fcf5a9e47867',
      clientSecret: '6d5297eda0643a171a9e5510f5ea1c29ad851389',
      repo: 'Forgo7ten.github.io',
      owner: 'Forgo7ten',
      admin: ['Forgo7ten'],
      id: '3e0cabbbbe61e44eded02bce2f38d9da',
      updateCountCallback: commentCount
    },{"language":"en","perPage":20,"distractionFreeMode":true,"pagerDirection":"last","createIssueManually":true}))

    gitalk.render('gitalk-container')
  }

  if (typeof Gitalk === 'function') initGitalk()
  else {
    addGitalkSource()
    getScript('https://cdn.jsdelivr.net/npm/gitalk@latest/dist/gitalk.min.js').then(initGitalk)
  }
}

function commentCount(n){
  let isCommentCount = document.querySelector('#post-meta .gitalk-comment-count')
  if (isCommentCount) {
    isCommentCount.innerHTML= n
  }
}

if ('Gitalk' === 'Gitalk' || !false) {
  if (false) btf.loadComment(document.getElementById('gitalk-container'), loadGitalk)
  else loadGitalk()
} else {
  function loadOtherComment () {
    loadGitalk()
  }
}</script></div><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/activate-power-mode.min.js"></script><script>POWERMODE.colorful = true;
POWERMODE.shake = true;
POWERMODE.mobile = false;
document.body.addEventListener('input', POWERMODE);
</script><script id="click-show-text" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/click-show-text.min.js" data-mobile="false" data-text="ヾ(≧▽≦*)o 点个收藏叭,(*^▽^*),w(ﾟДﾟ)w,ㄟ(≧◇≦)ㄏ,(/≧▽≦)/点个关注叭,Σ(っ °Д °;)っ,(●ˇ∀ˇ●),( •̀ ω •́ )✧,(*/ω＼*),ヽ(*。&gt;Д&lt;)o゜真的不收藏一下嘛,(～o￣3￣)～,ヽ（≧□≦）ノ" data-fontsize="15px" data-random="false" async="async"></script><script src="https://cdn.jsdelivr.net/npm/pjax/pjax.min.js"></script><script>let pjaxSelectors = ["title","#config-diff","#body-wrap","#rightside-config-hide","#rightside-config-show",".js-pjax"]

var pjax = new Pjax({
  elements: 'a:not([target="_blank"])',
  selectors: pjaxSelectors,
  cacheBust: false,
  analytics: false,
  scrollRestoration: false
})

document.addEventListener('pjax:send', function () {

  // removeEventListener scroll 
  window.tocScrollFn && window.removeEventListener('scroll', window.tocScrollFn)
  window.scrollCollect && window.removeEventListener('scroll', scrollCollect)

  typeof preloader === 'object' && preloader.initLoading()
  document.getElementById('rightside').style.cssText = "opacity: ''; transform: ''"
  
  if (window.aplayers) {
    for (let i = 0; i < window.aplayers.length; i++) {
      if (!window.aplayers[i].options.fixed) {
        window.aplayers[i].destroy()
      }
    }
  }

  typeof typed === 'object' && typed.destroy()

  //reset readmode
  const $bodyClassList = document.body.classList
  $bodyClassList.contains('read-mode') && $bodyClassList.remove('read-mode')

})

document.addEventListener('pjax:complete', function () {
  window.refreshFn()

  document.querySelectorAll('script[data-pjax]').forEach(item => {
    const newScript = document.createElement('script')
    const content = item.text || item.textContent || item.innerHTML || ""
    Array.from(item.attributes).forEach(attr => newScript.setAttribute(attr.name, attr.value))
    newScript.appendChild(document.createTextNode(content))
    item.parentNode.replaceChild(newScript, item)
  })

  GLOBAL_CONFIG.islazyload && window.lazyLoadInstance.update()

  typeof chatBtnFn === 'function' && chatBtnFn()
  typeof panguInit === 'function' && panguInit()

  // google analytics
  typeof gtag === 'function' && gtag('config', '', {'page_path': window.location.pathname});

  // baidu analytics
  typeof _hmt === 'object' && _hmt.push(['_trackPageview',window.location.pathname]);

  typeof loadMeting === 'function' && document.getElementsByClassName('aplayer').length && loadMeting()

  // prismjs
  typeof Prism === 'object' && Prism.highlightAll()

  typeof preloader === 'object' && preloader.endLoading()
})

document.addEventListener('pjax:error', (e) => {
  if (e.request.status === 404) {
    pjax.loadUrl('/404.html')
  }
})</script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div><script src="/live2dw/lib/L2Dwidget.min.js?094cbace49a39548bed64abff5988b05"></script><script>L2Dwidget.init({"pluginRootPath":"live2dw/","pluginJsPath":"lib/","pluginModelPath":"assets/","tagMode":false,"debug":false,"model":{"scale":1,"hHeadPos":0.5,"vHeadPos":0.618,"jsonPath":"/live2dw/assets/z16.model.json"},"display":{"superSample":2,"width":200,"height":400,"position":"right","hOffset":0,"vOffset":-20},"mobile":{"show":true,"scale":0.5},"react":{"opacityDefault":0.7,"opacityOnHover":0.2},"log":false});</script></body></html>